<%@ page import="fleet_management.FuelConsumption"%>



<div
	class="fieldcontain ${hasErrors(bean: fuelConsumptionInstance, field: 'vehicleNumber', 'error')} required">
	<label for="vehicleNumber"> <g:message
			code="fuelConsumption.vehicleNumber.label" default="Vehicle Number" />
		<span class="required-indicator">*</span>
	</label>
	<g:if test="${fuelConsumptionInstance?.vehicleNumber}">
		<g:textField name="vehicleNumber"
			value="${fuelConsumptionInstance?.vehicleNumber}" disabled="disabled" />
	</g:if>
	<g:select name="vehicleNumber" from="${vehicleList}"
		value="${fuelConsumptionInstance?.vehicleNumber}"
		noSelection="['':'Select vehicle number']" />
</div>

<div
	class="fieldcontain ${hasErrors(bean: fuelConsumptionInstance, field: 'quantityRefuled', 'error')} required">
	<label for="quantityRefuled"> <g:message
			code="fuelConsumption.quantityRefuled.label"
			default="Quantity Refuled" /> <span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="quantityRefuled" required=""
		value="${fieldValue(bean: fuelConsumptionInstance, field: 'quantityRefuled')}" />
</div>


<div
	class="fieldcontain ${hasErrors(bean: fuelConsumptionInstance, field: 'place', 'error')} ">
	<label for="place"> <g:message
			code="fuelConsumption.place.label" default="Place" />

	</label>
	<g:textField name="place" value="${fuelConsumptionInstance?.place}" />
</div>


<div
	class="fieldcontain ${hasErrors(bean: fuelConsumptionInstance, field: 'date', 'error')} required">
	<label for="date"> <g:message code="fuelConsumption.date.label"
			default="Date" /> <span class="required-indicator">*</span>
	</label>
	<g:datePicker name="date" precision="day"
		value="${fuelConsumptionInstance?.date}" />
</div>


<div
	class="fieldcontain ${hasErrors(bean: fuelConsumptionInstance, field: 'totalCost', 'error')} required">
	<label for="totalCost"> <g:message
			code="fuelConsumption.totalCost.label" default="Total Cost" /> <span
		class="required-indicator">*</span>
	</label>
	<g:field type="number" name="totalCost" required=""
		value="${fieldValue(bean: fuelConsumptionInstance, field: 'totalCost')}" />
</div>


<div
	class="fieldcontain ${hasErrors(bean: fuelConsumptionInstance, field: 'reFuledOnKM', 'error')} ">
	<label for="reFuledOnKM"> <g:message
			code="fuelConsumption.reFuledOnKM.label" default="Refuled On KM" />

	</label>
	<g:textField name="reFuledOnKM"
		value="${fuelConsumptionInstance?.reFuledOnKM}" />
</div>


<div
	class="fieldcontain ${hasErrors(bean: fuelConsumptionInstance, field: 'driverName', 'error')} required">
	<label for="driverName"> <g:message
			code="fuelConsumption.driverName.label" default="Refuled By" />
		<span class="required-indicator">*</span>
	</label>
	<g:if test="${fuelConsumptionInstance?.driverName}">
		<g:textField name="driverName"
			value="${fuelConsumptionInstance?.driverName}" disabled="disabled" />
	</g:if>
	<g:select name="driverName" from="${driverName}"
		value="${fuelConsumptionInstance?.driverName}"
		noSelection="['':'Select Driver Name']" />
</div>
